import request from '@/utils/request'

// 获取我的待办
export function getFlowTodoCount() {
  return request({
    url: '/api/visualdev/Dashboard/FlowTodoCount',
    method: 'get'
  })
}
// 校区区域报表
export function getCampusRegion() {
  return request({
    url: '/api/visualdev/dashboard/report/region',
    method: 'get'
  })
}
// 新签约校区报表
export function getCampusSign() {
  return request({
    url: '/api/visualdev/dashboard/report/sign',
    method: 'get'
  })
}
// 获取通知公告
export function getNotice() {
  return request({
    url: '/api/visualdev/Dashboard/Notice',
    method: 'get'
  })
}
// 获取未读邮件
export function getEmail() {
  return request({
    url: '/api/visualdev/Dashboard/Email',
    method: 'get'
  })
}
// 获取待办事项
export function getFlowTodo() {
  return request({
    url: '/api/visualdev/Dashboard/FlowTodo',
    method: 'get'
  })
}
// 获取我的待办事项
export function getMyFlowTodo() {
  return request({
    url: '/api/visualdev/Dashboard/MyFlowTodo',
    method: 'get'
  })
}

// 获取数据统计
export function getCountData() {
  return request({
    url: '/api/visualdev/Dashboard/CountData',
    method: 'get'
  })
}

// 获取新闻信息
export function getArticle() {
  return request({
    url: '/api/visualdev/Dashboard/Article',
    method: 'get'
  })
}

// 按品牌 sign/brand
// 按渠道 consult/chanel
// 按省份 consult/region
export function getReportPie(url, type) {
  return request({
    url: `/api/visualdev/dashboard/${url}/${type}`,
    method: 'get'
  })
}
// 续费率
export function getRenewal(url, data) {
  return request({
    url: `/api/${url}`,
    method: 'get',
    data
  })
}
// 导出
export function getRenewalExport(url, data) {
  return request({
    url: `/api/campus/${url}`,
    method: 'get',
    data
  })
}


export function getTrainReportPie(url, data) {
  /* panel/two */
  return request({
    url: `/api/campus/train/dashboard/${url}/${data.brand}/${data.year}`,
    method: 'post'
  })
}


